POV-Ray : Newsgroups : povray.binaries.images : Re: Color question : Re: Color question Server Time
17 Aug 2024 00:17:28 EDT (-0400)
  Re: Color question  
From: Hugo
Date: 24 Nov 2001 08:17:13
Message: <3bff9dd9$1@news.povray.org>
Hi  JPGargoyle,

Welcome to the Povray newsgroups! To understand why  "rgb 1"  is the same as
"rgb <1,1,1>"  I'd like to say that it's a general rule in Pov, that you may
use this kind of short typing. It takes fewer keystrokes on the keyboard,
and sometimes it looks simpler on the screen when you have a lot of code.
This is the only reason. It makes things easier for you, but gives the same
result in Pov.

Pov always need 3 numbers for a color expression  <r, g, b>  but when it
finds only one, it copies that number into all 3 places. Similar with other
commands, such as "scale", "translate" and so on.. If you write "scale 2"
Pov will copy it into <2, 2, 2> because this is the only information you
have given.

You may use other shortcuts. For example  2*x   is the same as <2, 0, 0>
because you only put a number into the x direction.

I have never tried to write  1-Gray25  so I don't know why Pov says it's
suspicious. To me it looks fully okay. I think there is another reason for
this warning.. Once Pov said the same to me. It was because I used too many
shortcuts in one place, so Pov wasn't sure what I meant.. For example, when
you want to colorize an object, the full description would be "material
 texture { pigment { color rgb <1,1,1> } } }"  so you can be glad that Pov
accepts you only write "pigment { rgb 1 }".


Regards,
Hugo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.